<?php
$obj = new db();
$tensp = isset($_GET["search"])?$_GET["search"]:"";
$result= $obj->select("sanpham", array("masp", "tensp", "dongia", "hinh"), " tensp like '%$tensp%' ");

echo "Kết quả tìm được: ". $obj->getRowCount()." sản phẩm";
?>
<div class="product-list-content">
	<?php 
	foreach($result as $row)
	{
		?>
    <div class="m-product-item">
		<div class="product-pic">
            <a href="#" class="product-image">
                <img id="product-collection-image-25324" src="
					<?php echo BASE_URL;?>images/sanpham/<?php echo $row["hinh"];?>"/>
            </a>
		</div>	
		<div class="price-block">
			<p class="product-name"><?php echo $row["tensp"];?></p>
			<p><?php echo $row["dongia"];?>K</p>
        </div>
	</div>
        <?php	
	}
	?>
</div>
